<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>纯Css3轮播图</title>
		<style type="text/css">
			/*清除样式*/
			
			* {
				margin: 0;
				padding: 0;
			}
			
			ul,
			li {
				list-style: none;
			}
			/**/
			
			.floatfix {
				*zoom: 1;
			}
			
			.floatfix:after {
				content: '';
				display: table;
				clear: both;
			}
			
			.slider-contaner {
				width: 100%;
				position: relative;
			}
			
			.slider,
			.slider-item {
				padding-bottom: 40%;
			}
			
			.slider-item {
				width: 100%;
				/*height: 300px;*/
				position: absolute;
				/*background-size: cover;*/
				animation-duration: 20s;
				animation-timing-function: linear;
				animation-name: run;
				animation-iteration-count: infinite;
			}
			
			.slider-item1 {
				background-image: url(img/img1.jpg);
			}
			
			.slider-item2 {
				background-image: url(img/img2.jpg);
			}
			
			.slider-item3 {
				background-image: url(img/img3.jpg);
			}
			
			.slider-item4 {
				background-image: url(img/img4.jpg);
			}
			
			.slider-item5 {
				background-image: url(img/img5.jpg);
			}
			/*动画效果*/
			
			@keyframes run {
				0% {
					opacity: 0;
					z-index: 2;
				}
				5% {
					opacity: 1;
					z-index: 1;
				}
				20% {
					opacity: 1;
					z-index: 1;
				}
				25% {
					opacity: 0;
					z-index: 0;
				}
				100% {
					opacity: 0;
					z-index: 0;
				}
			}
			
			.slider-item+.slider-item {
				opacity: 0;
			}
			
			.slider-item1 {
				animation-delay: -1s;
			}
			
			.slider-item2 {
				animation-delay: 3s;
			}
			
			.slider-item3 {
				animation-delay: 7s;
			}
			
			.slider-item4 {
				animation-delay: 11s;
			}
			
			.slider-item5 {
				animation-delay: 15s;
			}
			
			.focus-container {
				position: absolute;
				bottom: 2%;
				z-index: 7;
				margin: 0 auto;
				left: 0;
				right: 0;
			}
			
			.focus-container ul {
				margin-left: 46%;
			}
			
			.focus-container li {
				width: 10px;
				height: 10px;
				border-radius: 50%;
				float: left;
				margin-right: 10px;
				background: #fff;
			}
			
			.focus-item {
				width: 100%;
				height: 100%;
				background: #51b1d9;
				border-radius: inherit;
				animation-duration: 20s;
				animation-timing-function: linear;
				animation-name: run;
				animation-iteration-count: infinite;
			}
			.focus-item2,.focus-item3,.focus-item4,.focus-item5{
				opacity: 0;
			}
			.focus-item1 {
				animation-delay: -1s;
			}
			
			.focus-item2 {
				animation-delay: 3s;
			}
			
			.focus-item3 {
				animation-delay: 7s;
			}
			
			.focus-item4 {
				animation-delay: 11s;
			}
			
			.focus-item5 {
				animation-delay: 15s;
			}
		</style>
	</head>

	<body>
		<section class="slider-contaner">
			<ul class="slider">
				<li class="slider-item slider-item1"></li>
				<li class="slider-item slider-item2"></li>
				<li class="slider-item slider-item3"></li>
				<li class="slider-item slider-item4"></li>
				<li class="slider-item slider-item5"></li>
			</ul>
			<div class="focus-container">
				<ul class="floatfix">
					<li>
						<div class="focus-item focus-item1"></div>
					</li>
					<li>
						<div class="focus-item focus-item2"></div>
					</li>
					<li>
						<div class="focus-item focus-item3"></div>
					</li>
					<li>
						<div class="focus-item focus-item4"></div>
					</li>
					<li>
						<div class="focus-item focus-item5"></div>
					</li>
				</ul>
			</div>
		</section>
	</body>

</html>